Partitioning (unstructured)
https://unstructured-io.github.io/unstructured/core/partition.html
#Unstructured
Facade partition
データソースごとのpartition_fooも用意されている
partition_image
https://unstructured-io.github.io/unstructured/core/partition.html#partition-image
pip install 'unstructured[image]'
PDFと画像は同じロジック(partition_pdf_or_image)で処理しているようで、PDFの依存がインストールされる
#pdf2image
https://github.com/Unstructured-IO/unstructured/blob/0.12.6/unstructured/partition/pdf.py#L844-L875
Tesseractラッパーっぽい
引数はocr_languages(廃止)に代えてlanguagesを使う
"\n\n".join([str(el) for el in elements]
LangChainでも使われている(👉UnstructuredFileLoader・UnstructuredURLLoader)